import java.net.Inet4Address;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.sql.*;
import java.util.Enumeration;

/**
 * Created by Administrator on 2017/8/10.
 */
public class Client {


    public static void main(String[] args) {
        try {
            Class.forName("com.empress.jdbc.empressDriver");
            Connection connection = DriverManager.getConnection("jdbc:empress://SERVER=NONE;DATABASE=F:\\TEST;");
            PreparedStatement statement = connection.prepareStatement("SELECT count(*) AS aa FROM C_ACTUATOR");
            ResultSet resultSet = statement.executeQuery();
            while (resultSet.next()) {
                int anInt = resultSet.getInt("aa");
                System.out.println(anInt);
            }
            resultSet.close();
            statement.close();
            connection.close();
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        } catch (SQLException e) {
            e.printStackTrace();
        }
    }
}

